home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
gg
/
gengetopt-2.6.lha
/
gengetopt-2.6
/
doc
/
main2.c
< prev
next >
Wrap
C/C++ Source or Header
|
2001-06-24
|
747b
|
42 lines
/* sample2.c */
/* If we use autoconf. */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
/* Check for configure's getopt check result. */
#ifndef HAVE_GETOPT_LONG
# include "getopt.h"
#else
# include <getopt.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include "cmdline2.h"
int
main (int argc, char **argv)
{
struct gengetopt_args_info args_info;
/* let's call our cmdline parser */
if (my_cmdline_parser (argc, argv, &args_info) != 0)
exit(1) ;
if (args_info.help_given)
{
printf ("This is a simple test for gengetopt\n");
my_cmdline_parser_print_help ();
}
if (args_info.version_given)
{
printf ("Here is the version\n");
my_cmdline_parser_print_version ();
}
return 0;
}